union moved inside function, unnecessary int removed from union and commented cout removed