Codes which i implemented to achieve functionality