functions wacky

final code