implemented comments from Frank and Gerardo