added view status check