change a little bit way things are validated
refactoring in submitted flag