fixed handle to work on arrays