trying again with better error messages for debugging