did some cleanup, fixed issue #1