added buffer option