adds function to initiate server