modified program run for locals
added and updated semantics for locals