optimize init function by generating records hash