Added next/previous functionlity