Added preliminary friction code