Implemented a simple expression function