merging #29 #24 and #28 and fixing issues
merging #29 #24 and #28 and fixing issues