changing to onlyif state