Finished version of lookup. Still not working.