submission logic