modify to improve implementation of SINGLE function
modify to introduce lookup-key derivation