added king  functionality