added a guards field, and rough drafts of guard related functions