add king functionality, though buggy