preliminary version of WHAM.