refactor some shit