functions done need to test and split files