changed buffer size to spectrum size