implementing skip remaining function in accodrion