resolved issues #24 and #29