Implimented a print function