added logic to generate courses list dynamically