deleted somes useless errors checks