flex code