added chechout function