skip if error
inline init, remove multiple storage of digis
use hashmap