Solved the problem, and seperated functions into different files. This is to make modification easy. A submission file will be created, and also testing + input needs to be added.