updated to use _applyStyles