Finish basic logic