add merchant checking function