encode knowledge