slight code optimization