intial work
Further changes to the reference number search