add bool format packing
basic refactoring of pack method to “as" type-casting pattern
formatting