fix lava, timings, refactor