added state pull and push and reap