fix makefile and add buffer conversions