add init function to prevent double loading