tested function overload, and removed a ] from array declaration