Added ret function