Added factor wheel and changed unsigned int to long