flag resource fully functional