Finalized tip logic
Added debugging