tidied up and added rudimentary error checking
fixed things and added put delete and post