making sure that we convert inputs into buffer first