More logic aded