added compare window code
added subelement comparing code