changed hash to return a string