modified with jvazquez-r7 comments