fix bug in IsPressed() and add code comments