Wall matching, a rational alternative to wall functions