made a substring checker with Maps