moved loading functions to separated class