slightly cleaner array map