added filtering for onlyAvailable
refactored names