made one big method to two small