moving functions between three packages