moving functions around