added Result writter (to be changed)