reorganized insert mechanism and added anylyzer