split the server/client logic
compile error fix