refactor after ned's talk