changing array format