remove the ugly code