only cast data if selected