bg implomentation p2 + file restrucshre