slight code improvements