some validations added, html reformatted