Improved Lauren's code