factorise a method