cleaned up comments and moved optional parameter to the end of the parameter list in the retrieve method