Classes output created and made function out of main