moving extent code