move debian install into function