closes #12 + fixes