first commit of WIP code that needs extensive testing for safety