added view and cancel function