modified code for home slider