fix animate method