Change primary function call and add basic documentation