use hash instead of class instance