sample code for loaders