ugly ugly code, but animation works