widened interface

finally figured out how to work with the sphagetti ish code
added annotations, a bit fidly though