remove last part of themal d