finished writing constructor