work in progress. basic structure in place