fix issues closes  #52 and closes #62