add complexity; write optimizer
refactor