added back array sorting for empty candle addition