Finished the program, just need to add space detection