closes #13 and more possible issues