added main constructor and fixed and little error in declaration of class