made a mistake with joules initialization