makeItSmooth implemented but not perfectly working