refactor code so that it uses fluent validation