moved functions to block, and made the parent_block happen