added em's changes
fixed merge conflict