added state hooks