refactoring, validaitons on invoie controller