some markup and major function work(unfinished)