general tweaking of functions and plots