cleaned temp code