refactored the redcarpet