better process handling in server