Code block functions