added getMode to buffer