lock funcitonality added. Not fully tested. Bug with touch event found.