update cleantime function