created updateStyles method