creating isolate scope to fix some issues