adapted to new libniftyled API