Updated lookup method to also accept optional parameters