adding ps6, starting to pass all harcoded arrs to good arrays
little refactor and some documentation about the algorithm