added attr access to flag_count in poly