fixed wonked function