Adding gesture functionality