closed issues #25, #26, #27 and #31