silly mistake of not including buffer pointer