working FBO and some improvements