cleaner code with Ken fix