use attributes instead of storing object in memory