added zero index function and set_block function