adapting for proper SDL