edited Boris' check