added constructor and something in main