early code gen; going to tweak states next.