moving functions to Function folder