refactor EVERYTHING