finished. unrefactored