made background colors work for >4 pages