less ugly code