Added locals function