added an auto save boolean to the constuctor