got array and buffer to work