refactor after sleeping on it