modified for PEP8
updated error message