changed hardcoded arraylength to count($vanArray)