refactors prob18