1. add plot function