add the logical part