rewrite getSubset and add other position calculation