[major] rewrite most parts, make constructor