after replay small reformatting and better coding