part of admin product list code, but it works.