adds while loop to keep server running