checking for errors now