Added a bit more program logic.  Still  need to finish put the retrieve method.