had to remove the buff.size() and make it a static number. I am not really sure why, but it was giving an error.