added condition for visible div