create main for server