introduce result printing flexibility
add lookups and new query functionality