Created an alert that notifies you when you have an error in the input.  Also removed the unused "greedy" function.