added id() and hasId() to Resource