move logic for Practice button into template.