added a down variable for drag, press function instead of click