added extensions class and completed main()