sync code to match updated server code