implode does not add tailing separator and rtrim is not needed here.