added funcitonality for plots