plot3, seperate functions