Adding checking of scope