more sensible errors
moved stuff around