.flatten not needed here