add array methods and sort function example