Added code for friction

In this commit it's not doing anything unless you take out the false in
the if statement.