program changed from an only file to a main file controlling the interface and a lib controlling the functions