added automated calculation of kL