Speed up due to checking the error in between
old