replaced conditions with scope block