updated random generator and server file