Server Working Code