Add positions function.