some modifications suggested by mentor