Complete functionality for handling penalty