GenerationTransaction code done if I don't missed any bugs :)