added versitility to mtplot functions, still working, fixed a few bugs in z