buffer is used to handle binary data