simplified - removed unnecessary de-bouncing code