fixes from mentor's suggestions