use wang formula for inputs