changes from @mvm comments