A study of mechanisms of graphite friction and wear