refactor and rename, may have broken everything