starting the actual podem algorithm