reformat code and add role as array string value