try
    screens = Screen('Screens');
    whichscreen = max(screens);
    [myscreen,rect]=Screen('OpenWindow',whichscreen);
    DrawFormattedText(myscreen, 'PRESS ANY KEY TO PROCEED', 'center', ...
    'center');
    Screen('Flip', myscreen);
    KbWait;
    y = KbName('y');
    n = KbName('n');
    words={'home', 'bank', 'nose', 'dog', 'car'};
    responses = zeros(length(words), 1);
    for i=1:length(words)
        WaitSecs(1);
        DrawFormattedText(myscreen, char(words(i)), 'center', 'center');
        Screen('Flip', myscreen);
        [secs, keyCode] = KbWait;
        while keyCode(y)==0 && keyCode(n)==0
            [secs, keyCode] = KbWait;
        end
        if keyCode(y) == 1;
            responses(i) = 1;
        end
    end
    screen('CloseAll');
catch
    Screen('CloseAll')
    rethrow(lasterror)
end