Moved hash calculation to getData()