fixed issue #2, still working on fixing other bugs