fixed WA-beta algorithm