In function, changed points type to discrete.