add toarray. update readme and tests