dont access elements of empty vectors