- filtering moved to a separate function
- added loading section