added constructor - fixed errors