implemented most of findValue
fixed mangling after last commit