Added some codes from previous projects.