rewriting slide in slide out effect