checkout logic done