remove unnecessary call to 'flatten'