converted to knockout js