Finished coding, still need to test.