Added array trimming in first task
better console messages