finish basic WIF functions and tests