Fixed the lookUp function