[buggy] further rewriting sdl module, should be done soon