writing html file - a very ugly first version