added fog, rewritten arg2v inline for conversion between arrays and []'s