finished a portion of #2