added John's changes