refactor some junk