finished class for shortener.py