how to calculate position size