Added inverted mode