Use SparseArray instead of HashMap