Made transition effect more generic