adding new functionality and some updates/bug fixes