refactor a few things since i have the file open i might as well do something useful