refactored background rendering;