updates to scope and compiler