sort of fixing environment currying, but not really since environment and local space can have clashing values. precedence matters here so we shoudl refactor how we manage local spaces