first attempt at lego lookup function