added lookup, completed logging