added loader logic for objects