Alter animate function to reduce delay