finished on init method and worked on insert method