There is already functionality for that implemented.