figure code updates