Changed method in line 48 5o call .endWith() instead of .contains