added view, factory and function changes