Updated the code to work on public data