yield moved to correct place