tidy and improve loader