used shared print function to seperate file