use enums, writw in file