Calling buffer function for storage