implementing expr class
refactoring around Expr