refactor and prodding around