tests updated with paths
reorganized functions between files