replace expression to contains

replace indexof to contains to get more expressive in the code.