Move cookies formating in helper method