cleaned up code to work with SDL2