switched example to guards