Improve data type to simplify the code
We can make the code more expressive and shorted by using a proper data type.