added methods edit and update for categories and products