added new js-function and placed it in an object