removed while loops and added more status messages