add convenience setStyles() function and encapsulate data