added sdl functionality