refactoring submit job in native + misc