last parallel array changed to a map and a clean up