whole program is working now