modified from 1
merged