cout num, trying to make this faster
somehow sped up program with 7 less additions
removed comments and cleaned up