added posting of subjects
changed error handling code