added an existsPrefix method