cleanup
added server side validation