Converting code to use rem