decoupled value k and value l computation, and made it more flexible on lacking data
switched back to dynamic computation