new functions for plot