trying to move avail calc outside the instanceStore update to get around unserializeable error