started to implement discretize