added better support for remote expressions