adding server side validation