removed non-constant value lookups. needs more thinking ...