added feature to cycle through images