added better error messaeg