extract bacground script behaviour