added logic for all the submissions