changes to contrast handling