moved code from productHandler to product