fixed buffer.c and added it to the project