rec while