Finished the code, bug/result tested