useful functions for working with Arrays and Objects