program and output restructure (in progress)