here be dragons

code has not been tested