finished implementing constructor