separate into two methods