Might actually work now.
Added tests