use markdown, refactor js