changed frameBuffer data type to (*f)[]