Split this method in several small methods