add plotting and some backend func