renamed task to state