Implemented KL function pending WS variable