fiddling with bg and fixed some bugs