working on modifying functions to allow additional info as an option
reworking functions to output a struct