refactored to use css selector