added px detection
aded position logic and click logic