add overflow char
fix parameters of constructor of template
implement put function