changed buffer method