improve documents
rewrite code logic and improve graphics