install dependencies when needed