payment before updating lessons table