Updated the look up script to handle multiple definitions