calculating K from data 3
calculating K from data 4