added bg flag