setup secure environment