A method based on polynomial approximations for numerical solution of volterra integral equations