Add buffer function for appending long