made basic functions into separate files