funtion score calculation corrections