server side solution:minor changes