modified category convert script