updated reverse to be lazy