better scripts for server/viewer