adding flex slider and reformatting code