removed debugging code, improved error message. specs passing.