implemented draw, slope comparison and tested