added more code involving buffer/array procedures