made a typo change
Put ouput in a constant
Made all changes Blake recommended