Break out logic into different methods