Selects right program and stuff