Place LVP analysis in separate function