this method is getting pretty large. could it be split up?