finished functionally, need to clean up the code and comment