A refresher when i saw some codes useful from the web