lots of changes. closes #1