link up and create switch functionality for traits-table