improved error messages, removed function names