fixed Dennis' errors