attempt to put the functions in same file to see if the performance goes up