Update submission function to be able to use several models