update of loader to adapt to both datasets