converted functions into a package