fixed status flag bit checking. fun fact: integer & (1 << offset) returns 2^offset if it's not 0