Change package name and examples
Pull function definition outside of loop