implementing profiles in plotanalysis
bug fix
second bug fix