added timing functions for touch animation