refactored courses show into index