add animation improve logic