WIP: start building a better submit handler