merged server and algorithm