closes #22 #21 #36 #37