functions wacky

added more comments