Added some friction code