added the tap fuinction to the window instead of separate items