with check out function