adding init/destroy and load/destroy functions