Implemented prefix checking