added scope to main controller