An inverse problem for the heat equation