refactoring x->w y->f