Added buffer filling routines