updated server to have transfer function