server and client , TODO: check if this works