corrected and completed function assignment rule