when i have the top case on it it freeze's like every 20mins when i take the top case off it runs for about 3hours i think that it is like it is over heating
Are you talking about the 360 or the xbox 1? If games freeze while playing the xbox 1 clean out the E:\CACHE or use compressed air to dustout the xbox components completely and clean the fan. About the 360 get a high performance fan or even better than that, if you got the 3 year service extention send it to microsoft for repair.
If it's getting overheating issues, do as locobrown suggested. A complete clean will be needed. If it is still giving you issues, apply new thermal paste to the CPU and GPU.