found a minor bug in the support function