Use SparseArray instead of HashMap
Substitute HashMap with SparsArray