scope not working