debugging stuff and creating html, not finished yet.