Changed the code to allow different prefixes