simplify hash in products controller