function simplifications fixes
unique function invalidate