refactor to start from scratch