added func and more help for user using it as a program