background color management and code refacto