local and global flatness