added constructor and comments