resourses divided from code ,improved listeners