Adding legacy code from TL