update style to deal with more variables