add plot functions
make compilable package