remove logging and switch logic