Added an option to limit the output to a single result