Added two methods to work with arrays