turn quanitity into class