functionality to draw vector added