implemented 2 of the Gerd's suggestions.