cleaning up function in review.js