added condition to views