add insert method to array