updates functional and flush is called