Changed attribute names. Added guard functionality