added type hinting and removed length for text type