base server functionality