updated click functionality nad removed unused script