fixing #38 & #36