fixed scoping issues and improved phrases