added remote version of getmax
1.d) renamed, further work on remote