move youtube api out of init function