using animation class instead of creating surfaces