added proper type hinting. closes #31