functions for commerce version 1.0