reformatting for better readability
check for nil block
document that the blocks must not be nil