changed King logic