fix compare fxn for lists; error catching