error checking
fixed merge conflict