Use promise from animate function