scope resolution error Solution: making variable result as local