add some more comfort to ref state calculation