state fixed, updated readme and tests