Added inputs for handling the whole set of BufferParameters function parameters
fixing if else statement