added features and fixes

resolves issue #51, #50