[refac] expressed boolean operators as a dsl from the assignment doc