looks better, still need tests though