bugfix, added new functions