adding prefix detection support