Update of the program, still trying to fix date bug when pipe:ing