Added example and improved prior detection