https://ethfans.org/posts/condition-orientated-programming