func prototype for custom packages
code tidy up