added server side validation