slight code tweak