Lookup parsing added and programming flaw corrected