implemented genration and basic output close #16 close #15 close #14 close #13 close #12