add class first and last on container