add guard and bootstrap