Added check for submitted or previous submitted