basics to get it working
tweaking to run