added naive graphic and fixed errors