removed unnecessary list transformation
fixed error message