empty renamed to clear,
added asserts for first and last setters