added method to find out if animation finished