Worked out submitting to DB

Worked out submitting to DB