progress almost done, need to make it pretty and refactor