Updating the rank writers and adding unit test