built new API; closes #1