just needed to add a main function :P more is detailed in various code comments