about to switch vector for list
changing to list made code prettier but didn't fix problem.