added newScope() functionality