rework from a clean base

reworked from a clean base and updated error message