server receive function
merge conflicts