added functions to dealing with integer arrays