add logic to generate positions