corrected assigning default values to vars