The medication , commonly known as Viagra, is a regulated treatment primarily used to address difficulty achieving an erection in males . Developed initially for heart conditions , its unanticipated side effects relating to the widening of blood vessels led to its subsequent use as an reliable so