base library for server