modify to use thin