Finished. need to refactor