added comments to stringCheck function