Implemented onSelect extension