editing bg change function