cleans up some of the logic, prep for better AI