Added code to detect taps and started calculations to select objects based on taps