more error checks, reuse code for retreival for people