Added function prototypes
Added and tested isTouched function