Use hash instead of arrays