basic working version, without any input support or update-loop