finished initialization code. Now need to work on lookup routine