create function to return piece hash at specified piece index