add guard to constructors