removing unneeded endsWith method