function to execute entire bf program