Fixed PAA Function

algorithm used to generate PAA list now working correctly