added code for Logic Calculator