adding selection sample code