def byteRead(i2c,address: int,register: int,nReg: int=1) -> bytearray:
    """
    Method to read current state of the given registers. 
    
    Parameters
    -----
    i2c : i2c object from busio.I2C
    address : WHO_AM_I address of slave
    register : register to be read
    nReg : determines length of bytes read from each register, defaults to 1. 
            If > 1 it must be checked that the device allows consecutive reading.
    """
    # nReg for each register if multiple registers
    state = bytearray(nReg)
    i2c.writeto(address,bytes([register]))

    for i in range(nReg):  
        #state gets sliced, each register has its place
        i2c.readfrom_into(address,state,start=nReg*i,end=(nReg*i)+nReg)
    return state