Refactoring
Added generalised version of state