added map and apply primative procedures