completed readme, added comments, and refined the code for submission.