Finish Logical Code