install dependencies only when needed