minor changes.  cleaner code