updated script and server to suport it