changes flags to int so they can be printed