Instead of using integer values, please define an enumeration somewhere to represent the semantic meaning. That will make the code more readable.