function for array rendering added