fixes, progress, works for heat (tests ok)