change frame buffer from struct to class