beginning of mark logic