seperated the long program to several shorter ones