closes #15 fixed a bug