minor changes, working version without lfp