modified script and category controller