finished issue #2; still need to refactor ugly code