addressing comments on last commit with a few fixes