implemented server functionality