added const to some global input buffers