converted to javascript