almost completed user function. stuck on a few parts.