adding test for expressions, and fixing their impl