added code to checkTrue()