refactoring
added model validation to web api