redistributed functions to different files