modified from 2