Added promises to control animation flow