created methods for pair, object and arrays