added state, fixes #5