adding default values and fixing a minor thing or two