create subset to improve speed [to be checked]