Make slide a function, passed test