using startBlock and endBlock in class initializer