begin solution using yield