server coding for double agent project