modded to work on server