Implemented the expr procedure