added factors and stuff