removed duplicate loading function (copied and pasted twice)