server accepts functions