minor edits. have to refactor immensely.