refactored transaction to fully utilize constants