moved Buffer to separate file
buffer working
implemented