before working on HTML generate