implemented spritepainter and tried it out in main.cpp