code to put key rate to table