add the feature of calculating friction
add the feature of calculating friction