factoring and fix