add dynamic memory example