error checking details added